package com.hxz.admin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.hxz.admin.mapper.AdminCommentsMapper;
import com.hxz.admin.service.AdminCommentService;
import com.hxz.entity.ArticleComment;
/**
 * 文章评论实现类
 * @author hxz
 * @description TODO
 * @data 2019年12月5日 上午9:33:22
 */
@Service
public class AdminCommentServiceImpl implements AdminCommentService{
	@Autowired
	private AdminCommentsMapper adminCommentsMapper;
	
	@Cacheable(value="comnents",key="'id_'+#id")
	public List<ArticleComment> getCommentList() {
		
		return adminCommentsMapper.getCommentList();
	}
	
	public Integer deleteCommentById(Integer id) {
		
		return adminCommentsMapper.deleteCommentById(id);
	}

}
